	<!-- Begin page -->
	<div class="container">
	
		<div class="full-content-center">
			<p class="text-center"><a href="#"><img src="<?php echo(URL);?>assets/img/login-logo.png" alt="Logo"></a></p>
			<p>
			<div class="login-wrap animated flipInX">
				<div class="login-block">
						<div class="form-group login-input">
							<i class="fa fa-key overlay"></i>
							<input type="password" class="form-control text-input" id="pass" placeholder="Nova clau">
						</div>
						<div class="form-group login-input">
							<i class="fa fa-key overlay"></i>
							<input type="password" class="form-control text-input" id="pass2" placeholder="Repetir nova clau">
						</div>
						<div class="row">
							<div class="col-sm-12">
								<section>
									<p style="color:white;" id="result"></p>
								</section>
							</div>
						</div>
						<div class="row">
							<div class="col-sm-12">
								<button type="submit" onclick="javascript:set_nuevo_password();" class="btn btn-success btn-block">Canvi password</button>
							</div>
						</div>
				</div>
			</div>
			
		</div>
	</div>
	<!-- the overlay modal element -->
	<div class="md-overlay"></div>
	<!-- End of eoverlay modal -->
	
	<script>

	function set_nuevo_password(){
		
		var pass = $("#pass").val();
		var pass2 = $("#pass2").val();
		var email = "<?php echo($data->email); ?>";
		var id_usuario = "<?php echo($data->id_usuario); ?>";

		if(pass == pass2){
			$.ajax({
		        type: "post",
		        data:{mail:email,usuario:id_usuario,clau:pass},
		        url: url_base+"update-contrasenya",
		        success: function(data){
			        var data = jQuery.parseJSON(data);
			        if(data = "true"){
						setMsg("Contrasenya modificada correctament");
					}else{
						setMsg("No s'\ha pogut canviar la contrasenya");
					}
		        }
		    });
		}else{
			setMsg("Contrasenyes no coincideixen");
		}
		
	}
	
	function setMsg(val){
		$("#result").html("");
		$("#result").html(val);
	}	




	
	


	</script>
							